home *** CD-ROM | disk | FTP | other *** search
/ Harvard Graphics 4.0 / Harvard Graphics 4.0 for Windows 95 - SPC (1995) - Disk 09 of 13.img / PROGRAM.9 / Tutorial / T5PRES.DXR / 00001.ls next >
Encoding:
Text File  |  1995-09-12  |  3.3 KB  |  188 lines

  1. on startMovie
  2.   set the centerStage to 1
  3. end
  4.  
  5. on init
  6.   global flipOut, slipOut
  7.   installMenu(0)
  8.   set the stageColor to 8
  9.   set the mouseUpScript to EMPTY
  10.   set flipOut to EMPTY
  11.   set slipOut to EMPTY
  12. end
  13.  
  14. on menuFlipCheck whichMenu
  15.   global activeMenu
  16.   if whichMenu = activeMenu then
  17.     flip()
  18.   end if
  19. end
  20.  
  21. on flipNull
  22.   global slipOut, flipOut
  23.   set flipOut to EMPTY
  24.   set slipOut to EMPTY
  25. end
  26.  
  27. on flip
  28.   global flipOut
  29.   put flipOut
  30.   if flipOut = EMPTY then
  31.     if the frame < 999 then
  32.       go(the frame + 1)
  33.     end if
  34.   else
  35.     go(marker(flipOut))
  36.   end if
  37. end
  38.  
  39. on slip
  40.   global slipOut
  41.   if slipOut = EMPTY then
  42.     if the frame > 2 then
  43.       go(the frame - 1)
  44.     end if
  45.   else
  46.     go(marker(slipOut))
  47.     set slipOut to EMPTY
  48.   end if
  49. end
  50.  
  51. on puppetize fromSprite, toSprite, state
  52.   repeat with channel = fromSprite to toSprite
  53.     puppetSprite(channel, state)
  54.   end repeat
  55. end
  56.  
  57. on checkRollOver fromSprite, toSprite
  58.   global currentSprite, oldRollover
  59.   repeat with channel = fromSprite to toSprite
  60.     if rollOver(channel) = 1 then
  61.       if currentSprite <> channel then
  62.         set currentSprite to channel
  63.         popMenu()
  64.       end if
  65.     end if
  66.   end repeat
  67. end
  68.  
  69. on popMenu
  70.   global oldRollover, currentSprite
  71.   set the ink of sprite currentSprite to 2
  72.   if oldRollover <> currentSprite then
  73.     set the ink of sprite oldRollover to 36
  74.   end if
  75.   set oldRollover to currentSprite
  76.   updateStage()
  77. end
  78.  
  79. on fixit
  80.   if the mouseCast = 489 then
  81.     cleanupmenu()
  82.   else
  83.     repeat while the mouseDown = 0
  84.       checkRollOver(6, 13)
  85.     end repeat
  86.   end if
  87. end
  88.  
  89. on fixitagain
  90.   if the mouseCast = 489 then
  91.     cleanupmenu()
  92.   else
  93.     repeat while the mouseDown = 0
  94.       checkRollOver(6, 14)
  95.     end repeat
  96.   end if
  97. end
  98.  
  99. on cleanupmenu
  100.   global flipOut
  101.   set the mouseUpScript to EMPTY
  102.   set flipOut to EMPTY
  103.   flip()
  104.   updateStage()
  105. end
  106.  
  107. on setOrigin
  108.   global origin
  109.   set origin to the frame
  110. end
  111.  
  112. on returnOrigin
  113.   global origin
  114.   if origin <> 0 then
  115.     go(origin)
  116.   end if
  117. end
  118.  
  119. on flipKey
  120.   set the keyDownScript to EMPTY
  121.   flip()
  122. end
  123.  
  124. on showBullet vSprite, state
  125.   set the visible of sprite vSprite to state
  126. end
  127.  
  128. on NextBullet
  129.   if the key <> RETURN then
  130.     set the castNum of sprite 12 to the number of cast "diamondBullet"
  131.   else
  132.     flip()
  133.   end if
  134. end
  135.  
  136. on checkKeyCode whatKeyCode
  137.   if the keyCode = whatKeyCode then
  138.     flip()
  139.   end if
  140. end
  141.  
  142. on checkKey whatKey
  143.   global whatAction
  144.   if the key = whatKey then
  145.     whatAction()
  146.   end if
  147. end
  148.  
  149. on clickFlip buttDown, buttUp, Action1
  150.   set the castNum of sprite the clickOn to the number of cast buttDown
  151.   repeat while the stillDown
  152.     if the mouseCast = the number of cast buttUp then
  153.       set the castNum of sprite the clickOn to the number of cast buttDown
  154.       updateStage()
  155.     end if
  156.     if the mouseCast = the number of cast buttDown then
  157.       nothing()
  158.     else
  159.       set the castNum of sprite the clickOn to the number of cast buttUp
  160.       updateStage()
  161.     end if
  162.     updateStage()
  163.   end repeat
  164.   if the mouseCast = the number of cast buttDown then
  165.     set the castNum of sprite the clickOn to the number of cast buttUp
  166.     updateStage()
  167.     do(Action1)
  168.   end if
  169. end
  170.  
  171. on flipRightArrow
  172.   flip()
  173. end
  174.  
  175. on slipLeftArrow
  176.   slip()
  177. end
  178.  
  179. on hoofItHome
  180.   go(1, the pathName & "Home")
  181. end
  182.  
  183. on hoofItOut
  184.   unLoadCast()
  185.   clearGlobals()
  186.   quit()
  187. end
  188.